# CMake 最低版本号要求
cmake_minimum_required (VERSION 2.8)

project(COMON)

set (CMAKE_INSTALL_PREFIX /opt/ECG)
INCLUDE_DIRECTORIES( /opt/ECG/include)

if(INSTALL_HEAD_FILE_ONLY)

message(STATUS "just install head files...")

install(FILES inc/SysErr.h inc/SysErrCode.h inc/private_hid.h DESTINATION include/common)


else(INSTALL_HEAD_FILE_ONLY)
message(STATUS "compile project...")

set(SysErr_SRC src/SysErr.cpp)

add_library(SysErr SHARED ${SysErr_SRC})

install(TARGETS SysErr DESTINATION  lib)

endif(INSTALL_HEAD_FILE_ONLY)
